package com.credit.management.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.credit.management.system.custom.dao.CContractMapper;
import com.credit.management.system.generator.dao.ContractMapper;
import com.credit.management.system.jdbc.dao.ContractDao;
import com.credit.management.system.model.Contract;
import com.credit.management.system.model.Page;
import com.credit.management.system.service.IContractService;
@Service
public class ContractService implements IContractService {
	@Autowired
	private ContractMapper contractMapper;
	@Autowired
	private CContractMapper cContractMapper;
	@Autowired
	private ContractDao contractDao;
	/**
	 * 根据id删除contract
	 */
	@Override
	public int deleteByPrimaryKey(Long id) {
		
		return contractMapper.deleteByPrimaryKey(id);
	}
	/**
	 * 选择字段插入contract
	 */
	@Override
	public int insertSelective(Contract contract) {
	
		return contractMapper.insertSelective(contract);
	}
	/**
	 * 选择字段修改contract
	 */
	@Override
	public int updateByPrimaryKeySelective(Contract contract) {
		
		return contractMapper.updateByPrimaryKeySelective(contract);
	}
	
	/**
	 * 根据id查询contract
	 */
	@Override
	public Contract selectByPrimaryKey(Long id) {
		
		return contractMapper.selectByPrimaryKey(id);
	}
	/**
	 * 分页查询contracts
	 */
	@Override
	public Page findPageContracts(Page page) {
		
		return contractDao.findPageContracts(page);
	}

}
